<?php
defined('IS_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header');
?>
<div class="pad_10">
<div class="table-list">
    <table width="100%" cellspacing="0">
        <thead>
		<tr>
		<th width="80">Siteid</th>
		<th><?php echo L('site_name')?></th>
		<th><?php echo L('site_dirname')?></th>
		<th><?php echo L('site_domain')?></th>
		<th><?php echo L('mobile_domain')?></th>
		<th><?php echo L('godaddy')?></th>
		<th><?php echo L('operations_manage')?></th>
		</tr>
        </thead>
        <tbody>
<?php 
if(is_array($list)):
	foreach($list as $v):
?>
<tr>
<td><?php echo $v['siteid'];?></td>
<td align="center"><?php echo $v['name'];?></td>
<td align="center"><?php echo $v['dirname'];?></td>
<td align="center"><a href="<?php echo $v['domain'];?>" target="_blank"><?php echo $v['domain'];?></a></td>
<td align="center"><a href="<?php echo $v['mobile_domain'];?>" target="_blank"><?php echo $v['mobile_domain'];?></a></td>
<td align="center"><?php if ($v['siteid']!=1){?><?php echo SYS_HTML_ROOT?>/<?php echo $v['dirname'];} else{echo '/';}?></td>
<td><a class="btn btn-xs green" href="javascript:edit(<?php echo $v['siteid'];?>, '<?php echo new_addslashes(new_html_special_chars($v['name']));?>')"><?php echo L('edit');?></a>
<?php if($v['siteid']!=1) { ?><a class="btn btn-xs red" href="###" onclick="Dialog.confirm('<?php echo new_addslashes(new_html_special_chars(L('confirm', array('message'=>$v['name']))));?>',function(){redirect('?m=admin&c=site&a=del&siteid=<?php echo $v['siteid'];?>&pc_hash='+pc_hash);});"><?php echo L('delete');?></a><?php } ?></td>
</tr>
<?php 
	endforeach;
endif;
?>
</tbody>
</table>
</div>
<div class="list-footer table-checkable clear">
    <div class="col-md-7 list-select"></div>
    <div class="col-md-5 list-page"><?php echo $pages?></div>
</div>
</div>
<script type="text/javascript">
<!--
function edit(id, name) {
	dr_iframe('edit','?m=admin&c=site&a=edit&siteid='+id,'60%','60%');
}
//-->
</script>
</body>
</html>